﻿
@model IEnumerable<WebApplication2.Models.SysUser>


<p>
    @Html.ActionLink("NEW Create","Create");
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.UserName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <th>
          
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>@Html.DisplayFor(b => item.UserName)</td>
            <td>@Html.DisplayFor(a => item.Email)</td>
            <td>@Html.ActionLink("Details", "Details",new { id=item.ID})</td>

            <td>@Html.ActionLink("update", "Update", new { id = item.ID })</td>

            @*<td>@Html.ActionLink("delete", "delete", new { id = item.ID }, new { onclick = "return (confirm('确定要删除吗？'))" })</td>*@
            <td>@Html.ActionLink("delete", "delete", new { id = item.ID }, new { onclick = "return ni()" })</td>
          
        </tr >
    }
    
</table>
<script>
    function ni() {
        if (confirm("你确定要删除吗!")) {
            return true;
        } else {
            return false;
        }
    }

</script>

